/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.hiddendanger.mapper;

import com.koron.hiddendanger.domain.ItemCheckRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ItemCheckRecordMapper {

    /**
     * 根据主键查询填写的检查表的记录的某个检查项详情
     * @param id
     * @return
     */
    ItemCheckRecord queryOne(@Param("id") String id);

    /**
     * 根据某次使用的检查表记录的id查询填写的检查项列表
     * @param checklistEntryId
     * @param start
     * @param rows
     * @return
     */
    List<ItemCheckRecord> queryItemRecordsByReferenceId(@Param("checklistEntryId")String checklistEntryId,@Param("start") Integer start,
                                                        @Param("rows") Integer rows);

    /**
     * 根据某次使用的检查表记录的id统计填写的检查项列表
     * @param checklistEntryId
     * @return
     */
    Integer countItemRecordsByReferenceId(@Param("checklistEntryId")String checklistEntryId);

    /**
     * 新增检查项的结果
     * @param bean
     * @return
     */
    Integer insert(@Param("bean") ItemCheckRecord bean);

    /**
     * 批量新增检查项结果
     * @param recordList
     * @return
     */
    Integer batchInsert(@Param("recordList") List<ItemCheckRecord> recordList);

    /**
     * 新增检查项的结果
     * @param bean
     * @return
     */
    Integer update(@Param("bean") ItemCheckRecord bean);

    /**
     * 批量新增检查项结果
     * @param itemCheckRecordList
     * @return
     */
    Integer batchUpdate(@Param("itemCheckRecordList") List<ItemCheckRecord> itemCheckRecordList);

    /**
     * 根据主键批量删除检查项结果
     * @param idList
     * @return
     */
    Integer batchDelete(@Param("idList") List<String> idList);
}
